<?php 
/**
 * 订单列表模型
 */
class OrderListModel extends Model{
    public $table = 'order_list';
    
    public $auto = array();
    
    public $validate = array();
    
    public function addOrderList($v,$oid){
		$this->data=array(
			'quantity'=>$v['num'],
			'subtotal'=>$v['total'],
			'number'=>K('GoodsList')->where("glid={$v['id']}")->getField('number'),
			'oid'=>$oid,
			'gid'=>K('GoodsList')->where("glid={$v['id']}")->getField('gid'),
		);
    	$this->add();
    }
	
	
 }
 
 
 
 
 
 
 
 
 
 
 








 ?>